import { ElMessage, ElNotification, NotificationParams, NotificationParamsTyped } from 'element-plus';
import { NotificationProps, NotificationOptions } from 'element-plus/lib/components/notification';

// options?: NotificationParamsTyped
export interface NotifyApi {
  info( options?: NotificationParamsTyped): void;
  success(options?: NotificationParamsTyped): void;
  error( options?: NotificationParamsTyped): void;
  // warn(config: NotificationProps): void;
  warning( options?: NotificationParamsTyped): void;
  // open(args: NotificationProps): void;
  // close(): void;
  // config(options: NotificationOptions): void;
  // destroy(): void;
  closeAll: () => void;
}

export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
export declare type IconType = 'success' | 'info' | 'error' | 'warning';


/**
 * @description: message
 */
 export function useMessage() {
  return {
    createMessage: ElMessage,
    notification: ElNotification as NotifyApi,
    // createConfirm: createConfirm,
    // createSuccessModal,
    // createErrorModal,
    // createInfoModal,
    // createWarningModal,
  };
}
